package cn.icyzx.service;

import cn.icyzx.dao.SendMail;
import cn.icyzx.models.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by zk on 2016/9/28.
 */

@Service
public class EmailService {

    @Autowired
    SendMail sendMail;

    @Autowired
    private UserService userService;

    public void sendEmailToActive(String email) {
        User user = userService.getUserByEmail(email);
        sendMail.sendMailToActive(user);
    }
}
